﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Net;
using Twillo.Core.Settings;

namespace TwilloClient
{
    static class Program
    {

        /// <summary>
        /// The main entry point for the application.
        /// </summary>         
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Forms.frmMain frm = new Forms.frmMain();

            if (string.IsNullOrEmpty(SettingsManager.AccessToken))
            {
                Twillo.Core.Twitter.GrantAccess();
            }

            frm.Opacity = SettingsManager.FormOpacity;
            frm.RefreshIntervalSeconds = SettingsManager.RefreshIntervalSeconds;

            ApplicationContext context = new ApplicationContext(frm);
            Application.Run(context);

        }
    }
}
